﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Text;

namespace EmailService
{
    public static class EmailSender
    {
        public static void SendText(string to, string subject, string message)
        {
            var client = new SmtpClient();
            var mailMessage = new MailMessage {Subject = subject, Body = message};
            mailMessage.To.Add(to);
            mailMessage.SubjectEncoding = Encoding.UTF8;
            mailMessage.BodyEncoding = Encoding.UTF8;

            client.Send(mailMessage);
        }
    }
}
